<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="ice" uri="http://www.icesoft.com/icefaces/component"%>
<f:view>
    <ice:outputHtml>
        <ice:outputHead>
            <title>JSP Page</title>
            <ice:outputStyle href="./xmlhttp/css/xp/xp.css"/>
        </ice:outputHead>
        <ice:outputBody>
            <ice:outputText value="Pokaż drzewo"/>
            
            <ice:form>
                <ice:tree id="tree"
                        value="#{treeDemo.model}"
                        var="item"
                        hideRootNode="false"
                        hideNavigation="false"
                        imageDir="./xmlhttp/css/xp/css-images/" >
                    <ice:treeNode>
                        <f:facet name="icon">
                        <ice:panelGroup style="display: inline">
                             <h:graphicImage value="#{item.userObject.icon}"/>
                        </ice:panelGroup>
                        </f:facet>
                        <f:facet name="content">
                            <ice:panelGroup style="display: inline">
                                <ice:outputLink value="#{item.userObject.url}">
                                    <ice:outputText value="#{item.userObject.text}" />
                                </ice:outputLink>
                            </ice:panelGroup>
                        </f:facet>
                    </ice:treeNode>
                </ice:tree>
                <ice:commandLink value="Powrót" action="back"/>
            </ice:form>
        </ice:outputBody>
    </ice:outputHtml>
</f:view>